Characterization of Coastal Systems#

Welcome to the first notebook exercise of Coastal Systems (TU Delft, MSc Coastal Engineering)! This is the first year that we will experiment with notebooks in this course. With these notebooks we hope to provide you with interactive course material that helps you better understand the processes and concepts that we teach in this course. Please let us know how you find the notebooks - we appreciate your feedback!

Chapter 2 of Coastal Dynamics Open Textbook describes the large geographical variation of coasts across the world. It explains how the coasts that we have today are shaped by both present-day processes and processes millions years ago. It distinguishes between three different order of features, which are associated to different orders of of time. In this notebook we will look at coastal systems at these different orders of scale.

Import libraries that we use for our analysis#

In the two cells below we import the libraries that we need for the analysis. We also set some path settings to load the data and source code. For example, in the cell below we add the src directory to the system path, which allows us to import generic functions from ../../src/coastpy.

import os
import pathlib
import sys

# make coastpy library importable by appending root to path
cwd = pathlib.Path().resolve()
proj_dir = cwd.parent.parent  # this is the root of the CoastalCodeBook
sys.path.append(str(proj_dir / "src"))
import warnings

os.environ["USE_PYGEOS"] = "0"  # use shapely 2.0 instead of PYGEOS and silence warnings

import colorcet as cc
import dask.dataframe as dd
import geopandas as gpd
import holoviews as hv
import hvplot.pandas  # noqa: API import
import hvplot.xarray  # noqa: API import
import ipyleaflet
import numpy as np
import pandas as pd
import panel as pn
from geoviews import tile_sources as gvts
from ipyleaflet import Map, Marker, ScaleControl, basemaps
from ipywidgets import HTML

pn.extension()

from coastpy.geometries import geo_bbox

# definitly not a best practice, but a workaround to avoid many warnings triggered by shapely 2.0 release
warnings.filterwarnings("ignore", category=RuntimeWarning)
warnings.filterwarnings("ignore", category=UserWarning)

DATA_DIR = proj_dir / "data"
coastal_systems_fp = DATA_DIR / "01_coastal_systems.gpkg"

Exercise 1: Plate tectonics#

In this notebook we will start with the broadest (or first order) features of the coast that cover large geographical distances (thousands of kilometres) and are linked to the long-term geological process of plate tectonics. We will do so by using earthquake data from the USGS. The dataset we load contains a sample (10%) of observed eartquakes between Jan 2000 and Dec 2018. Why earthquake data? Earthquake data reveals geologists the mysteries of the deep, but also for coastal researchers the data is insightful. Let’s first load the data by running the next cells.

Load the earthquake data#

We load the data (tabular data including geometries) and index the columns to only keep the data in memory that we actually need. In total the dataset contains 2.2 million earthquakes, but here we use a sample (10%), so the data contains approx. 220k eartquake entries. If you find that the interactive panel responds slow to how you adjust the widgets, please consider to take another sample. You can do so by uncommenting the sample line in the next cell. So if you set frac=0.1 you have a dataframe with approx. 22k unique earthquakes over the world.

WEB_MERCATOR_LIMITS = (
    -20037508.342789244,
    20037508.342789244,
)  # max polar latitudes that can be handled in World Mercator

df = (
    dd.read_parquet(DATA_DIR / "01_earthquakes_sample.parquet")
    .sample(
        frac=0.1
    )  # uncomment this line if loading the data takes too long on your computer
    .set_index("time")
    .compute()
    .tz_localize(None)
    .sort_index()
)


# To save memory we drop most of the columns. Also we drop the polar latitudes that cannot be displayed in the web mercator projection.
df = df[["mag", "depth", "latitude", "longitude", "place", "type"]][
    df["northing"] < WEB_MERCATOR_LIMITS[1]
]
df.head()
mag depth latitude longitude place type
time
2000-01-01 17:22:36.230 1.8 5.427 34.373000 -120.725000 38km SW of Lompoc, California earthquake
2000-01-02 02:02:43.440 4.2 33.000 47.605000 154.423000 Kuril Islands earthquake
2000-01-02 02:46:40.730 1.3 2.411 34.620833 -116.236167 13km SSW of Ludlow, California earthquake
2000-01-02 18:48:55.600 3.9 32.000 35.480000 22.510000 central Mediterranean Sea earthquake
2000-01-03 11:30:31.520 4.3 33.000 26.705000 53.664000 southern Iran earthquake

Visualization of the earthquake data#

To explore the data we use visualization tools from the Holoviz project that makes high-level tools to simplify visualization in Python. In the next cell we enable the interactive mode on the data dataframe, create widgets to explore the data and filter the dataframe accordingly. To explore the eartquake data we create an overlay of the eartquakes on a tileset of ESRI Imagery. Please note that the code in the next cell will only do the computations and store the result in an object called panel. To actually see the results you have to run one more cell; the one that calls this object panel.

# enable widget indexing
dfi = df.interactive()


# define widgets that can be used to index the data
mag_subrange = pn.widgets.RangeSlider(name="Magnitude", start=0.1, end=10)
depth_subrange = pn.widgets.RangeSlider(name="Depth", start=0.1, end=650)
date_subrange = pn.widgets.DateRangeSlider(
    name="Date", start=df.index[0], end=df.index[-1]
)
column_types = pn.widgets.Select(options=["mag", "depth"])

# interactive dataframe, indexed using the widgets
dfi_filtered = dfi[
    (dfi.mag > mag_subrange.param.value_start)
    & (dfi.mag < mag_subrange.param.value_end)
    & (dfi.depth > depth_subrange.param.value_start)
    & (dfi.depth < depth_subrange.param.value_end)
    & (dfi.index >= date_subrange.param.value_start)
    & (dfi.index <= date_subrange.param.value_end)
]

cmap = cc.CET_L4[::-1]  # inverted fire colormap from colorcet

# TODO: update labels of colorbars
# df.opts(colorbar_opts={"title": colorbar_labels[column_types.value]})
# colorbar_labels = {"mag": "Magnitude [Richter]", "depth": "Earthquake depth [m]"}

# interactive earthquake visualization
dfi_plot = dfi_filtered.hvplot(
    x="longitude",
    y="latitude",
    color=column_types,
    kind="points",
    geo=True,
    cmap=cmap,
    tools=["tap"],
    hover_cols=["place", "time"],
    logz=True,
    clim=(1, None),
    frame_width=800,
)

# base layer from satellite imagery
tiles = gvts.EsriImagery()

# plot the earthquakes plot over the baselayer
earthquakes_plot = tiles * dfi_plot

dashboard_title = pn.panel("## Global distribution of Earthquakes (USGS Data)")
header = pn.Row(dashboard_title)
panel = pn.Column(header, earthquakes_plot)

If the visualization is too slow, please follow the instructions in loading the data for taking a sample.

After running the cell below you will have a panel with several widgets to index the eartquake data; by magnitude, depth and time, while the colors on the map show either the magintude or the depth of the earthquakes.

panel

Explore the earthquake data & questions#

  1. How do the earthquake magnitude and earthquake depth relate to the coasts that we see? (Hint: See Figure 2.3 in the textbook and consider how deep under the ground the plates are moving.)

  2. Earthquake data support one of the most fundamental processes in the geology: plate tectonics. Although plate tectonics is a relatively slow process that acts on the geological time scale, it has had an enormous impact on the formation of coastlines and determines the broadest features of the coast. What are two important inherited aspects of this process?

  3. In 1971 Inman, D. L. & Nordstrom, C. E. used plate tectonics to classify the coast. Explain the classification that they introduced. What are the three different classes that they distinguish? How do they match with the earthquake data as you can explore in the panel?

  4. Can you identify or predict areas around the world where you will find these coasts? What kind of coasts do you have in Chili? And how are they different to the east coast of the USA? And what is characteristic about the East China sea?

  5. Inman, D. L. & Nordstrom (1971) further distinguish Afro-trailing-edge coasts and Amero-trailing-edge coasts based on differences in sediment supplies. What is the main cause of these differences in sediment supply? And how do you expect the differences in sediment input to show in the coastal geomorphology?

Exercise 2: Process-based coastal classification#

In the section part of this notebook we will explore several coastal systems around the world considering the second and third order scale of features. In chapter two of the Coastal Dynamics open textbook it is explained how coastal systems can be classified according to the processes that characterize these systems. For example, one of the figures (below) shows how the relative influence of fluvial, wave and tidal processes influences the shape of coastal features. The idea of this exercise is that you identify the signatures of the processes that are introduced in chapter 2 in several coastal systems around the world.

image

The coastal systems data#

In the cell below we define a small plot function that generates a ESRI World Imagery basemap given a longitude, latitude, zoom level and name. Also, a small sheet of coastal systems around the world is loaded into geopandas, a Python library for geospatial tabular data. In the cells afterwards we sample this dataframe and show the coastal system on a map. Since the sample is random you might encounter the same coastal system multiple times; then you can just run the cell again to get another ‘coastal draw’.

coastal_systems = gpd.read_file(coastal_systems_fp)
pn.extension()
title_bar = pn.Row(
    pn.pane.Markdown(
        "## Exercise 2: Coastal system characterization",
        style={"color": "black"},
        width=800,
        sizing_mode="fixed",
        margin=(10, 5, 10, 15),
    ),
    pn.Spacer(),
)

options = coastal_systems.name.to_list()
coastal_systems_slider = pn.widgets.Select(
    name="Coastal system", options=options, value=np.random.choice(options)
)

@pn.depends(coastal_systems_slider.param.value)
def plot_coastal_system(name):
    system = coastal_systems.loc[coastal_systems["name"] == name].copy()
    west, south, east, north = system[
        ["west", "south", "east", "north"]
    ].values.flatten()

    return system.hvplot.points(
        x= "lon",
        y="lat",
        geo=True,
        color="red",
        alpha=0,
        xlim=(west, east),
        ylim=(south, north),
        tiles="ESRI",
        frame_width=1100,
        ylabel="Latitude [deg]", 
        xlabel="Longitude [deg]", 
    )


app = pn.Column(
    title_bar,
    pn.Row(coastal_systems_slider),
    pn.Row(plot_coastal_system),
)
app

Explore the coastal systems#

While sampling over a range of coastal systems, try to answer the following questions.

  1. Find and compare a heavily engineered river-dominated delta and a more natural river-dominated delta

  2. Compare the scale of the biggest and smallest tidal basin in the dataset

  3. Find the estuarine and deltaic systems with a spit

  4. Compare and contrast wave-dominated deltas with high and low sediment supply. How can you tell?

  5. Find a tidal estuary with large fine (muddy) sediment supply, then find one with a large coarse (sandy) sediment supply. How can you tell the difference?

  6. The eastern and western tips of the Dutch and German Wadden Islands are very different beach ridge environments. How might differences in sediment supply explain this? Where is the sediment coming from?

  7. The Dune du Pilat in France is one of the world’s largest coastal sand dunes (it is also one of the coolest and you should definitely visit if you get the chance!). Why is it located on the east side of Arcachon Inlet and not the west?

  8. Look at the northern Jiangsu coast in China. What might explain the limited sediment supply in this location?

  9. Find an estuary or tidal bay with extensive intertidal flats. Do you see salt marshes or mangrove forests nearby? Why or why not?

  10. Find an inlet with jetties. How might this affect the way it evolves?

  11. Find a delta/estuary/inlet whose shape is constrained by the presence of rocky coastal features.

  12. The Albufeira Lagoon in Portugal opens and closes seasonally. In the image shown, is it open or closed? When and how might it open or close?

  13. Find examples of heavily urbanized estuaries. How might these human interventions influence the natural processes there?

  14. Based on these satellite images, which is the most beautiful site? Taking a moment to appreciate the beauty of these natural systems is an important part of your job as coastal engineers.